﻿/** 
@file
@brief TXLog 实现的头文件
@version 2005-12-12 shockingli
*/

#pragma once

#include <time.h>

//
//#ifndef TX_DISABLE_EXAMDATA
//__interface ITXData;
//[ idl_quote("interface ITXData;") ];
//
///// ITXExamData 建议一些模块提供此接口，以供内部查其状态数据。
//[
//	uuid("CA4DAC1A-2D46-4f62-A5A0-42F8F1535A3E"),
//	pointer_default(unique),
//	dual,
//	object
//]
//__interface ITXExamData
//{
//	HRESULT GetData(ITXData ** pTXData);
//};
//#endif
#define DIV_K 1024
//#define _FRAME_MEM_USAGE_LOG

#ifdef __cplusplus
#define extc extern "C"
#else
#define extc
#endif

extc void * _ReturnAddress(void);
#pragma intrinsic(_ReturnAddress)



///base: log base,不含指针的类。
/**
@ingroup ov_TXLog
*/
typedef struct tagLogObjBase
{
	UINT  uSize;
	INT    nLogLevel;
	INT    nLineNumber;
	DWORD  dwProcessId;
	DWORD  dwThreadId;
	DWORD  dwTick;
	DWORD  dwExtraDataLen;
	time_t tmTime;
	INT64  perfc;
	//w: source filename
	//w: function name
	//w: filter
	//w: text
	//module name:fixed 16 bytes
}tagLogObjBase;
typedef struct tagLogObj
{
	tagLogObjBase base;
	PVOID  pExtraData;
	LPCWSTR pszSourceFileName;
	LPCWSTR pszFuncName;
	PVOID  pRetAddr;
}tagLogObj;
